﻿@{
    ViewBag.Title = "手机号码验证";
    var timer = DateTime.Now.AddSeconds(60);//倒计时
}
@using System.Threading
@using ZBJF.Warranty.Common.Enums.System
@model ZBJF.Warranty.Model.ViewModel.Sellers.SellerEmployeeModel
<link href="~/Content/login.css" rel="stylesheet" />
<div class="desc_forward_title" onclick="history.back(-1)">
    手机号码验证
</div>
@using (Html.BeginForm("NextToComplete", "Register", FormMethod.Post, new { id = "resiterForm" }))
{
    <div class="login-register">
        <div class="user-phone">
            @Html.TextBoxFor(m => m.UserPhone, new { @class = "weui-input", type = "tel", placeholder = "请输入手机号", validate = "{required:true,isTelphone:true,messages:{required:'请输入手机号'}}" })
        </div>
        <div class="verification-code">
            @Html.TextBoxFor(m => m.VerificationCode, new { @class = "weui-input", placeholder = "请输入验证码", validate = "{required:true,messages:{required:'请输入验证码'}}" })
            <div class="vcode-btn">
                <label id="text">点击获取</label><label id="timer"></label>
            </div>
        </div>
    </div>
    <div class="margin-t-30 w-p90">
        <a href="javascript:void(0)" class="weui-form-preview__btn weui-form-preview__btn_primary border-radius-6" onclick="if ($('#resiterForm').valid()) {$('#resiterForm').submit(); } else { return false };">
            下一步
        </a>
    </div>
}
<script src="~/Scripts/ValidatePhone.js"></script>
<script type="text/javascript">
    $(function () {
        $(".vcode-btn").click(function () {
            if ($("#UserPhone").valid()) {
                sendVcode(this, $("#UserPhone").val(), "您输入的手机号码已被注册！", @((byte)VerificationCodeTemp.SMS_120125563));
            }
        });
    });
</script>